package com.kexun.service.impl;


import com.kexun.dao.StuDao;
import com.kexun.dao.impl.StuDaoImpl;
import com.kexun.pojo.Student;
import com.kexun.service.StuService;

import java.util.Map;

public class StuServiceImpl implements StuService {
    private StuDao st = new StuDaoImpl();


    /**
     * 查询学生信息
     *
     * @return
     */
    @Override
    public Student findStuInfo(String stuNum){

        Student stu = st.findStuInfo(stuNum);
        return stu;
    }

    /**
     * 修改学生信息
     *
     * @param student
     * @return
     */
    @Override
    public int update(Student student) {
        int i = st.update(student);
        return  i ;
    }

    /**
     * 查询学生信息查看
     *
     * @param stuNum
     * @return
     */
    @Override
    public Map<String, Object> findScore(String stuNum ,int page,int limit ) {
     Map<String,Object> map = st.findScore(stuNum,page,limit);
     return map;
    }


    /**
     * 查询课程
     *
     * @param stuNum
     * @param page
     * @param limit
     * @param coursename
     * @return
     */
    @Override
    public Map<String, Object> findCourse(String stuNum, int page, int limit, String coursename) {
        Map<String,Object> map = st.findCourse(stuNum,page,limit,coursename);
        return map;
    }


}
